home *** CD-ROM | disk | FTP | other *** search
/ Collection of Tools & Utilities / Collection of Tools and Utilities.iso / system / epuptm17.zip / UPTIME.DOC < prev    next >
Text File  |  1994-04-24  |  5KB  |  107 lines

  1. Uptime is a program that I wrote to mimic the UNIX uptime command.  I went
  2. looking around for one, and I found a few.  The difference between uptime and
  3. all the others (that I found at any rate) is that uptime needs no data files.
  4. The other programs that I found either needed data files or were a TSR.  The
  5. data files ended up being mostly slack space, and the TSR's ate up memory.
  6. I also didn't want another file in my root directory (hidden or otherwise).
  7.  
  8. Uptime needs to be in the path somewhere (If dos can find it, uptime can find
  9. its self).  you call it from your autoexec.bat file and tell it to set
  10. itself.  Then, whenever you run uptime, it will tell you how long it has
  11. been since you last booted.  It will also (optionally) keep a log file of
  12. every time you boot.  If you have to reboot for any reason, and you don't
  13. want uptime to set its self, you can hold down either shift key, and it will
  14. skip the reset.
  15.  
  16. Use uptime with any parameter other than "set", "log" and/or "tail" and it
  17. will display a help screen.
  18.  
  19. Dvuptime is a modified version of uptime that is useful under DESQview.  It
  20. gives up it's timeslice (by polling the keyboard.  Any program that polls the
  21. keyboard loses it's timeslice by default) and waits for key to be pressed.
  22.  
  23. This is something that I hacked out in a short amount of time.  I tested it,
  24. and have been using it for quite some time.  I don't think there are any
  25. errors in it, but I can't be sure.  If you encounter one, let me know and
  26. I'll see if I can fix it.
  27.  
  28. Uploaded by the author, can be redistributed in the original form so long as
  29. there is no charge (your getting it for free, so should everyone else).
  30.  
  31. Hey, I think it would be really nifty if you find the program useful enough
  32. to keep on your hard drive, if you could send me a postcard and let me know
  33. where you got uptime, what you think of it, etc...
  34.  
  35.  
  36. Thanks
  37. Eric S Peters
  38. 3414 S Pitkin Way
  39. Aurora CO 80013 USA
  40. peters@cs.colostate.edu
  41.  
  42.  
  43. --Revisions
  44.  
  45. version 1.0
  46.   This version didn't include the "log" feature.
  47.  
  48. version 1.1
  49.   This version had the log, but you could only view the entire log.
  50.   This version was released, but nobody paid any attention to it.
  51.  
  52. version 1.2
  53.   Same as version 1.1, except I rewrote some really slow code.
  54.   First release that people actually used.
  55.  
  56. version 1.3
  57.   Fixed a bug with the TZ environment variable.  I didn't even know about
  58.   this variable.
  59.  
  60.   Put "(T)ail" and "(Q)uit" in the log feature.  When the log gets big, it
  61.   takes a long time to list it all.  This allows you to break out.
  62.  
  63. version 1.4
  64.   Fixed a problem with the MKS korn shell for dos.  The korn shell doesn't
  65.   append a newline to the output of the exiting program like command.com,
  66.   4dos.com, and ndos.com.
  67.  
  68.   Fixed a problem with the "(T)ail" feature of the log list.  It wasn't
  69.   displaying the last launch.  Also extended the tail from 10 to 20.
  70.  
  71. version 1.5
  72.   "Ported" to Borland C 3.1 from Turbo C 1.01.  Basically, I needed to add
  73.   some more #include directives.  Funny thing, the "eof" parameter is in
  74.   io.h.  If I include io.h, I get a linker error about how it can't cast
  75.   my file pointers.  If I leave it undefined, it works the way it is
  76.   supposed to.  Oh well.  I've learned to expect the unexpected with
  77.   Borland compilers.
  78.  
  79.   Made "tail" a command line option.  I found that I wanted the list,
  80.   but usually only wanted to see the tail.  This saves a little time and
  81.   keystrokes.
  82.  
  83. version 1.6
  84.   added support for country codes in the config.sys.  uptime will now
  85.   format the time and date as it should be for your country (don't
  86.   see how those Europeans can tell time like that, but oh well <grin>)
  87.  
  88.   Left dvuptime in the archive, but didn't change it to support country
  89.   codes.  I rarely ever use it, and I doubt anyone else does (switched
  90.   to OS/2 ya know!).
  91.  
  92.   BTW, anybody know how to write a program that will run from dos, and
  93.   native in an os2 window?  I have one that does it, and would like to
  94.   make uptime do it.  Also, does anybody know how to make os2 call a
  95.   program at bootup?  The os2 manuals aren't exactly made for programmers.
  96.  
  97. version 1.7
  98.   found my own bug with the ampm declarations when country info is U.S.
  99.   Also fixed a bug that I created in the log file with version 1.6 (It
  100.   was leaving a blank line at the top if there was no log.)  This change
  101.   might make your logfile have 2 entries on the same line the first time
  102.   you run it.  Sorry, but I'm not going to put in code to check for
  103.   this, because it will only happen once (went from appending a newline
  104.   at the begining of the log entry to the end.)
  105.  
  106. EOF
  107.